home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1998 January
/
Macworld (1998-01).dmg
/
Shareware World
/
Comms & Internet
/
HTML mode 2.0 etc.
/
Frontier Help
< prev
next >
Wrap
Text File
|
1997-08-17
|
9KB
|
210 lines
Using Alpha as Frontier's external editor
Frontier menu 2.0
August 1997
This document explains how to use Alpha as Frontier's external editor.
For help how to use Alpha as an HTML editor see the manual for HTML mode,
located in the folder HTML mode manual.
Please see the HTML mode home page, http://bach.theophys.kth.se/~jl/Alpha.html
for the latest version of HTML mode and Frontier menu. There you can also
download the HTML mode manual if you haven't got it already.
The code have been tested with Frontier 4.2.3, but it should work with at
least 4.2 and above. However, one very useful feature was introduced in
version 4.2.3. Beginning with this version Frontier adds the suffix .html
to the file name when sending it to Alpha. This makes Alpha automatically
switch to HTML mode, which is convenient when you're editing HTML.
Please send comments and bug reports to
Johan Linde, <jl@theophys.kth.se>
Acknowledgments
Almost immediately after I had released Frontier menu 1.0 I got to know that
Danis Georgiadis <dmg@hyper.gr> also had written some code to integrate
Alpha and Frontier. He generously gave me his code to freely use together
with mine. In this version I have taken the parts from his code which
could easily be integrated with mine and which worked without problems. The
Frontier database browser and the Scripts menu are both made by him.
When I made the Frontier shell I used some of Danis' code and some from
Matlab mode by Stephen Merkowitz <merk@lnf.infn.it>.
Installation and configuring
If you followed the installation instructions in the file READ ME TO
INSTALL then the file frontierMenu.tcl should be in the folder Menus
inside the folder Tcl and the file Frontier Help (this file) should be in
the folder Help.
Installing verbs into Frontier
The three files
system.verbs.apps.Alpha
user.html.editors.Alpha
user.Alpha
must be imported into Frontier. You find these find in the folder Frontier
in the install folder. Just double-click the files to import them. Frontier
will ask for a name of the imported objects. Use the ones suggested.
Note! If you have previously installed Frontier menu 1.0 you still have to
install these files. The ones distributed with Frontier menu 1.0 are not
compatible with Frontier menu 2.0.
There are also a few more changes you must do in Frontier:
• Change the path in user.odbEditors.TextEditor to the path to Alpha,
otherwise Frontier will use the default editor BBEdit.
• Similarly change the path in system.verbs.apps.Alpha.appinfo.path
• A small change must be made to the verb suites.odbEditor.editors.Text.edit
The last lines reads
bundle «send an Apple Event to the editor to open the temp file
«use an open protocol that's implemented by BBEdit 4.0 and greater
«the extra parameter to the odoc event is Frontier's app id
appleEvent (ideditorapp, 'aevt', 'odoc', '----', alias (tempfile), 'FSnd', Frontier.id)
Change them to
bundle «send an Apple Event to the editor to open the temp file
if defined(Alpha.id) && ideditorapp == Alpha.id
Alpha.edit(tempfile)
else
«use an open protocol that's implemented by BBEdit 4.0 and greater
«the extra parameter to the odoc event is Frontier's app id
appleEvent (ideditorapp, 'aevt', 'odoc', '----', alias (tempfile), 'FSnd', Frontier.id)
This change is needed because Alpha doesn't understand the Apple event used
in the last line. Hopefully Alpha will understand it in the future so that
you don't have to make this change in the future. If you decide to switch
back to your previous editor you don't have to undo the above change. It
will work as before with any other editor.
Inserting the Frontier menu in the menu bar
The Frontier menu doesn't automatically appear in the menu bar. To insert
it in the menu bar use Config -> Global -> Menus...
Shift-click to select frontierMenu and make sure the previously selected
menus are not deselected (unless you want to remove them of course).
The Frontier menu should now be inserted in the menu bar.
Opening a Frontier text window in Alpha
Text windows in Frontier can be opened in Alpha using Edit with App in
Frontier's Main menu. Whenever you save changes the Frontier database is
automatically updated. If you use 'Save as...' in Alpha the new file is
connected to the same location in the Frontier database as the old one.
Thus, there is hardly any point in doing 'Save as...'.
You can also use the Frontier database browser, see below.
Note! Do not quit Frontier until you have closed all Frontier windows in
Alpha. Alpha has to tell Frontier that the windows are closed and will
launch Frontier if it is not running.
Frontier menu
Switch to Frontier - Launches Frontier or brings it to front if already
running.
View in Browser - Makes Frontier render the page and sends it to the
browser for previewing. This is the same as 'View in
Browser' in Frontier's Web menu. This should only be used
for files opened from Frontier. Other HTML files are sent
to the browser using 'Send File to Browser' in the HTML
menu.
Frontier Shell - Opens a shell window where you can run Frontier scripts,
see below.
Browse - Opens a Frontier browser at different points in the database.
Use Add… and Remove… to edit this menu.
Open - Opens a Frontier window in Frontier. Use Add… and Remove… to
edit this menu.
Scripts Menu - Rebuilds the Scripts menu and loads the script corresponding
to the menu items.
Preferences… - To set your preferences for Frontier. Currently you can
choose if you want to automatically launch Frontier when
you launch Alpha. This is not done by default.
Scripts menu
The Scripts menu is a menu which you define inside Frontier in the same way as
you define shared menus for other applications. The menu definition must be
in user.Alpha.menubar. Alpha does not support menu sharing. Therefore there
are a few things which differ from how shared menu work. In particular:
• If you launch Frontier after Alpha the menu it not automatically inserted
in the menubar. You have to use Rebuild Scripts Menu to insert it.
• Whenever you modify the menu you have to use Rebuild Scripts Menu to
rebuild it. This has also to be done if you modify a script belonging to a
menu item.
• Keybindings for the menu items must be defined the way Alpha defines
keybindings. Alpha uses certain meta characters to define menu items. See
the section Menus, User Defined in the general manual.
Frontier database browser
The Frontier database browser lets you navigate through Frontier's
database without leaving Alpha. You can also open Frontier windows in
Alpha without leaving Alpha. In the browser windows, tables are red, text
windows are green, and everything else is blue. To navigate the windows
you can use key shortcuts similar to those used to navigate Finder windows.
uparrow - move up one line
downarrow - move down one line
rightarrow - rightarrow on a table displays the content of the table.
leftarrow - leftarrow on a table hides the content of the table.
cmd uparrow - opens the parent table in a new window.
cmd-opt uparrow - opens the parent table in a new window and closes the
current window.
cmd downarrow - cmd downarrow on a table opens a new window with the
content of that table.
cmd-opt downarrow - cmd-opt downarrow on a table opens a new window with
the content of that table and closes the current window.
return - opens the selected object for editing. Text objects are opened
in Alpha, and most other things are opened in Frontier.
Frontier shell
The Frontier shell is an alternative to the Frontier Quick Script window
for those who like a command history. Type a command and hit return to have it
executed in Frontier. The return value is then displayed on the next line.
You move up and down the command history using control-uparrow and
control-downarrow.
Control-u erases the current line.
WARNING! Don't send commands which will make Frontier open an alert window,
like e.g. dialog.notify. If this window is hidden behind your other
windows it will freeze your machine with command-option-escape as the only
way out.
Version history
2.0, 17 August 1997
• Added a Frontier shell.
• Added database browser and a Browse submenu.
• Added the Open submenu.
• Added Scripts menu, which is defined in Frontier as with other apps.
• 'Save as...' works now.
1.0, 20 July 1997
First public release